const PLATFORM = "XHTRANSLATE-COMMON-PLATFORM";
const LANGUAGE1 = "XHTRANSLATE-LANG1";
const LANGUAGE2 = "XHTRANSLATE-LANG2";

const BAIDULANGUAGE1 = "XHTRANSLATE-BAIDU-LANG1";
const BAIDULANGUAGE2 = "XHTRANSLATE-BAIDU-LANG2";

const ALILANGUAGE1 = "XHTRANSLATE-ALI-LANG1";
const ALILANGUAGE2 = "XHTRANSLATE-ALI-LANG2";

export default {
	/** 平台
	 * @param {Object} val
	 */
	setPlatform(val) {
		uni.setStorageSync(PLATFORM, val);
	},

	getPlatform() {
		return uni.getStorageSync(PLATFORM);
	},

	removePlatform() {
		return uni.removeStorageSync(PLATFORM);
	},
	/**
	 * 源语言
	 * @param {Object} val
	 */
	setLanguage1(val) {
		uni.setStorageSync(LANGUAGE1, val);
	},

	getLanguage1() {
		return uni.getStorageSync(LANGUAGE1);
	},

	removeLanguage1() {
		return uni.removeStorageSync(LANGUAGE1);
	},
	/**
	 * 目标语言
	 * @param {Object} val
	 */
	setLanguage2(val) {
		uni.setStorageSync(LANGUAGE2, val);
	},

	getLanguage2() {
		return uni.getStorageSync(LANGUAGE2);
	},

	removeLanguage2() {
		return uni.removeStorageSync(LANGUAGE2);
	},
	/**
	 * 百度图片源语言
	 * @param {Object} val
	 */
	setBaiduImgLanguage1(val) {
		uni.setStorageSync(BAIDULANGUAGE1, val);
	},

	getBaiduImgLanguage1() {
		return uni.getStorageSync(BAIDULANGUAGE1);
	},

	removeBaiduImgLanguage1() {
		return uni.removeStorageSync(BAIDULANGUAGE1);
	},
	/**
	 * 百度图片目标语言
	 * @param {Object} val
	 */
	setBaiduImgLanguage2(val) {
		uni.setStorageSync(BAIDULANGUAGE2, val);
	},

	getBaiduImgLanguage2() {
		return uni.getStorageSync(BAIDULANGUAGE2);
	},

	removeBaiduImgLanguage2() {
		return uni.removeStorageSync(BAIDULANGUAGE2);
	},
	/**
	 * 阿里图片源语言
	 * @param {Object} val
	 */
	setAliImgLanguage1(val) {
		uni.setStorageSync(ALILANGUAGE1, val);
	},

	getAliImgLanguage1() {
		return uni.getStorageSync(ALILANGUAGE1);
	},

	removeAliImgLanguage1() {
		return uni.removeStorageSync(ALILANGUAGE1);
	},
	/**
	 * 阿里图片目标语言
	 * @param {Object} val
	 */
	setAliImgLanguage2(val) {
		uni.setStorageSync(ALILANGUAGE2, val);
	},

	getAliImgLanguage2() {
		return uni.getStorageSync(ALILANGUAGE2);
	},

	removeAliImgLanguage2() {
		return uni.removeStorageSync(ALILANGUAGE2);
	}
};
